﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplicationAOPNetCore.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class AopTestController : ControllerBase
    {
        private readonly ICustomService customService;

        public AopTestController(ICustomService customService)
        {
            this.customService = customService;
        }

        [HttpGet]
        public virtual async Task<IActionResult> TestAop()
        {
            return Ok(await customService.Call());
        }
    }
}
